home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Bus / A / almanac 1.5 .cpt / Almanac v 1.5 / card_3076.txt < prev    next >
Text File  |  1989-01-02  |  6KB  |  237 lines

  1. -- card: 3076 from stack: in.5
  2. -- bmap block id: 7383
  3. -- flags: 0000
  4. -- background id: 2765
  5. -- name: Jupiter
  6. ----- HyperTalk script -----
  7. on openCard
  8.   put char 1 to 3 of second word of getJDDate() && first word of getJDDate() into he
  9.   if not ((second word of he) = first word of field "date") then fetch he
  10.   pass openCard
  11. end openCard
  12.  
  13. on fetch he
  14.   global rec
  15.   put "JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC" into months
  16.   if he is empty then exit fetch
  17.   if number of chars of he=5 then put "0" after char 4 of he
  18.   -- import text  put proper pathname here
  19.   put "Hard Disk:Astronomy:Galilean Eclipses:" & last word of the long date into fileName
  20.   repeat with month=1 to 12
  21.     if item month of months is in he then exit repeat
  22.   end repeat
  23.   if the shiftKey is up and number of lines of cd fld 1 ‚↠0 then
  24.     select text of cd fld 1
  25.     doMenu "Clear Text"
  26.   end if
  27.   put month&char 5 to 6 of he into target
  28.   open file fileName
  29.   repeat
  30.     set cursor to busy
  31.     read from file fileName until "&"
  32.     if it is empty then
  33.       exit repeat
  34.     end if
  35.     delete last char of it
  36.     if it contains target then
  37.       exit repeat
  38.     end if
  39.     if target < char 4 to 7 of line 2 of it then
  40.       get empty
  41.       exit repeat
  42.     end if
  43.   end repeat
  44.   put it into rec
  45.   close file fileName
  46.   put the number of lines of it into she
  47.   if she = 0 then
  48.     put "No Galilean Satellite Events for this date." into line 3 of card field 1
  49.     exit fetch
  50.   end if
  51.   put line 1 of it && return into card field 1
  52.   put "DATE   Time(UT) SP Radii" & return into line 2 of card field 1
  53.   repeat with i=2 to she
  54.     put "(not visible)" into temp
  55.     put word 3 of line i of it into time
  56.     put (char 1 to 2 of time+(char 4 to 5 of time)/60+24-DSTcheck()) mod 24 into time
  57.     put line 3 of cd fld 1 of cd sun + .5 into str
  58.     put line 4 of cd fld 1 of cd sun - .5 into sts
  59.     put line 4 of fld 6 into jr
  60.     put line 5 of fld 6 into js
  61.     if time <str or time >sts then
  62.       if jr < 12 then
  63.         if time <jr or time >js then
  64.           put empty into temp
  65.         end if
  66.       else
  67.         if time >jr or time <js then
  68.           put empty into temp
  69.         end if
  70.       end if
  71.     end if
  72.     put item month of months&&char 5 to 6 of he&&word 3 of line i of it &&" "&word 1 of line i of it&&(word 4 of line i of it)/10 && temp & return after card field 1
  73.   end repeat
  74. end fetch
  75.  
  76.  
  77. -- part 16 (button)
  78. -- low flags: 00
  79. -- high flags: 0000
  80. -- rect: left=398 top=181 right=205 bottom=437
  81. -- title width / last selected line: 0
  82. -- icon id / first selected line: 31949 / 31949
  83. -- text alignment: 1
  84. -- font id: 0
  85. -- text size: 12
  86. -- style flags: 0
  87. -- line height: 16
  88. -- part name: Satellite
  89. ----- HyperTalk script -----
  90. on mouseUp
  91.   get the seconds
  92.   add DSTcheck()*3600 to it
  93.   convert it to dateitems
  94.   put item 1 of it into line 3 of joe
  95.   put item 2 of it into line 1 of joe
  96.   put item 3 of it +(item 4 of it)/24 + (item 5 of it)/1440 into line 2 of joe
  97.   PutClipboard(joe)
  98.   open "JSAT"
  99. end mouseUp
  100.  
  101.  
  102.  
  103. -- part 18 (field)
  104. -- low flags: 00
  105. -- high flags: 0007
  106. -- rect: left=41 top=184 right=282 bottom=348
  107. -- title width / last selected line: 0
  108. -- icon id / first selected line: 0 / 0
  109. -- text alignment: 0
  110. -- font id: 22
  111. -- text size: 12
  112. -- style flags: 0
  113. -- line height: 16
  114. -- part name: total
  115.  
  116.  
  117. -- part 19 (button)
  118. -- low flags: 00
  119. -- high flags: 8003
  120. -- rect: left=6 top=313 right=334 bottom=87
  121. -- title width / last selected line: 0
  122. -- icon id / first selected line: 0 / 0
  123. -- text alignment: 1
  124. -- font id: 0
  125. -- text size: 12
  126. -- style flags: 0
  127. -- line height: 16
  128. -- part name: Today
  129. ----- HyperTalk script -----
  130. on mouseUp
  131.   put char 1 to 3 of second word of getJDDate() && first word of getJDDate() into he
  132.   fetch he
  133. end mouseUp
  134.  
  135.  
  136.  
  137. -- part 21 (button)
  138. -- low flags: 00
  139. -- high flags: A003
  140. -- rect: left=283 top=313 right=334 bottom=364
  141. -- title width / last selected line: 0
  142. -- icon id / first selected line: 0 / 0
  143. -- text alignment: 1
  144. -- font id: 0
  145. -- text size: 12
  146. -- style flags: 0
  147. -- line height: 16
  148. -- part name: Other Days
  149. ----- HyperTalk script -----
  150. on mouseUp
  151.   Ask "Enter date (mon dd):"
  152.   put it into he
  153.   fetch he
  154. end mouseUp
  155.  
  156.  
  157.  
  158. -- part 22 (button)
  159. -- low flags: 00
  160. -- high flags: A003
  161. -- rect: left=90 top=313 right=334 bottom=171
  162. -- title width / last selected line: 0
  163. -- icon id / first selected line: 0 / 0
  164. -- text alignment: 1
  165. -- font id: 0
  166. -- text size: 12
  167. -- style flags: 0
  168. -- line height: 16
  169. -- part name: Tomorrow
  170. ----- HyperTalk script -----
  171. on mouseUp
  172.   put char 1 to 3 of second word of TJDDate() && first word of TJDDate() into he
  173.   fetch he
  174. end mouseUp
  175.  
  176.  
  177.  
  178.  
  179. -- part contents for background part 7
  180. ----- text -----
  181. Sidereal Time = 19:13
  182. 19.231
  183.  
  184. -- part contents for background part 8
  185. ----- text -----
  186. 10.532373 1.7509241 -.2889554 -.4065956 .0168502 .0121559 .0117863 .0065057 .0004711 .0000428 -.0003972 -.0001867 -.0000491 -.000006
  187.  
  188. -- part contents for background part 9
  189. ----- text -----
  190. 42.843489 2.483478 -.956244 -.040251 .491389 -.106798 -.066149 -.002379 -.001812 .004352 .001587 .00038 .0 -.000172
  191.  
  192. -- part contents for background part 10
  193. ----- text -----
  194. Jupiter R.A. = 3h 38m
  195. Jupiter Dec.  = +18¬∞ 31'
  196. below E horizon
  197.  
  198. 54.521
  199. 18.532
  200.  
  201. -- part contents for background part 6
  202. ----- text -----
  203. Universal Time = 17:39
  204. 17.665
  205. 368
  206.  
  207. -- part contents for background part 13
  208. ----- text -----
  209. Jupiter Rises at 2:07 PM
  210. Jupiter Sets  at 4:00 AM
  211. 21.07
  212. 14.133
  213. 4.007
  214.  
  215. -- part contents for background part 14
  216. ----- text -----
  217. Jupiter
  218.  
  219. -- part contents for background part 31
  220. ----- text -----
  221. Julian Date = 2447529.236
  222.  
  223. -- part contents for background part 28
  224. ----- text -----
  225. 2 January 1989
  226.  
  227. -- part contents for background part 37
  228. ----- text -----
  229. 49%
  230.  
  231. -- part contents for card part 18
  232. ----- text -----
  233. JUPITER SATELLITE ECLIPSE EVENTS 
  234. DATE   Time(UT) SP Radii
  235. JAN 04 06:28.8  2R 1.2 
  236. JAN 04 15:04.6  1R 0.8 (not visible)
  237.